<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>工会管理- 工会提现记录</title>
        <meta name="keywords" content="">
        <meta name="description" content="">
        <link rel="shortcut icon" href="../favicon.ico">
        <link href="__PUBLIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
        <link rel="stylesheet" href="__PUBLIC__/css/ace.min.css"/>
        <link href="__PUBLIC__/css/font-awesome.css?v=4.4.0" rel="stylesheet">
        <link href="__PUBLIC__/css/animate.css" rel="stylesheet">
        <link href="__PUBLIC__/css/style.css?v=4.1.0" rel="stylesheet">
        <script src="__PUBLIC__/js/plugins/layer/laydate/laydate.js"></script>
        <style>
            .table-container {
                overflow: auto;
            }
            .img {
                max-width: 64px;
                max-height: 64px;
            }
            .left{ text-align: left !important; }
            .center{ text-align: center !important; }
            .right{ text-align: right !important; }
        </style>
    </head>
    <body class="gray-bg">
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>工会管理- <small>工会提现记录</small>
                            </h5>
                            <div class="ibox-tools" style="display:none;">
                                <a href="laboradd" class="btn btn-primary" style="margin-bottom: 0; margin-top:-8px;">添加</a>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <div class="dataTables_filter">
                                <form action="__SELF__" id="form1">
                                    <if condition="$app_code eq ''">
                                        <label>
                                            <select name="ddlapp" id="ddlapp" onchange="form_submit()">
                                                <option value="0">-项目-</option>
                                                <option value="" <if condition="$search.appsel eq ''">selected</if>>总后台</option>
                                                <volist name="apparr" id="apparr">
                                                    <option value="<{$apparr.app_flag}>" <if condition="$search.appsel eq $apparr['app_flag']">selected</if>><{$apparr.app_name}></option>
                                                </volist>
                                            </select>
                                        </label>&nbsp;
                                    </if>
                                    <label>
                                        <select name="addbank" id="addbank" onchange="form_submit()">
                                            <option   value="0" >-银行-</option>
                                            <volist name="laborbankclassarr" id="vo">
                                                <option value="<{$vo.value}>" <if condition="$search.banksel eq $vo['value']">selected</if>><{$vo.text}></option>
                                            </volist>
                                        </select>
                                    </label>&nbsp;
                                    <label>
                                        <select name="addstatus" id="addstatus" onchange="form_submit()">
                                            <option   value="0" >-审核状态-</option>
                                            <volist name="status_arr" id="vo">
                                                <option value="<{$vo.value}>" <if condition="$search.statusel eq $vo['value']">selected</if>><{$vo.text}></option>
                                            </volist>
                                        </select>
                                    </label>
<!--                                    &nbsp;
                                    <label>
                                        <select name="addwithdrawal" id="addwithdrawal" onchange="form_submit()">
                                            <option   value="0" >-交易状态-</option>
                                            <volist name="laborreturnstatusarr" id="vo">
                                                <option value="<{$vo.value}>" <if condition="$search.withdrawalsel eq $vo['value']">selected</if>><{$vo.text}></option>
                                            </volist>
                                        </select>
                                    </label>-->
                                    <label>
                                        <input type="text" id="txtbegintime" name="txtbegintime" placeholder="请输入开始时间"
                                               readonly="readonly" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm'})"
                                               value="<{$search.begintime}>"/>
                                    </label>
                                    <label>
                                        <input type="text" id="txtendtime" name="txtendtime" placeholder="请输入结束时间"
                                               readonly="readonly" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm'})"
                                               value="<{$search.endtime}>"/>
                                    </label>
                                    <label>
                                        <input type="text" id="txtkeyword" name="txtkeyword" value="<{$search.keyword}>"
                                               placeholder="请输入关键词"/>&nbsp;
                                        <input type="submit" id="btnsearch" name="btnsearch" value="搜索"/>
                                    </label>
                                </form>
                            </div>
                            <table class="table table-striped table-bordered table-hover table-container">
                                <thead>
                                    <tr>
                                        <th width="150px">提现时间</th>
                                        <th class="right">提现金额</th>
                                        <th>银行类型</th>
                                        <th>银行卡号</th>
                                        <th>真实姓名</th>
                                        <th>所属工会</th>
                                        <th>审核状态</th>
<!--                                        <th>交易状态</th>-->
                                        <th>订单号</th>
                                        <th width="200px" class="left">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                <volist name="data" id="vo">
                                    <tr id="<{$vo.id}>">
                                        <td><{$vo.ctime}></td>
                                        <td class="right"><{$vo.money}></td>
                                        <td><{$vo.bankclass_text}></td>
                                        <td><{$vo.bankaccount}></td>
                                        <td><{$vo.truename}></td>
                                        <td><{$vo.name}></td>
                                        <td><{$vo.status_text}></td>
<!--                                        <td><{$vo.returnstatus_text}></td>-->
                                        <td><{$vo.orderid}></td>
                                        <td class="left">
                                    <if condition="$vo.status eq 1">
                                        <a class="btn btn-rounded btn-info btn-detail" href="javascript:void(0);"
                                           onclick="finish('<{$vo.id}>', '', '1')" title="完成">完成</a>
                                        <a class="btn btn-rounded btn-danger btn-detail"  href="javascript:void(0);" onclick="balance_edit('<{$vo.id}>')"
                                           title="驳回">驳回</a>
                                    </if>
                                    </td>
                                    </tr>
                                </volist>
                                <if condition="($total eq null) or ($total eq 0)">
                                    <tr>
                                        <td colspan="20">没有数据</td>
                                    </tr>
                                </if>
                                </tbody>
                            </table>
                            <div class="dataTables_paginate paging_simple_numbers">
                                <ul class="pagination">
                                    <if condition="$total gt 0">
                                        <{$fpage}>
                                    </if>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--客服回复-->
        <!--<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">-->
        <!--<div class="ibox-content balance-content" style="display: none;">-->
        <!--<div class="modal-body">-->
        <!--<input type="hidden" id="hidid"/>-->
        <!--<form method="post" class="form-horizontal" onsubmit="return false">-->
        <!--<table class="table table-striped table-bordered table-hover text-center" id="sample-table">-->
        <!--<thead>-->
        <!--<div class="form-group">-->
        <!--<div class="col-sm-12">-->
        <!--<textarea id="content" name="content" class="form-control" placeholder="请输入驳回理由" style="height:72px;"></textarea>-->
        <!--</div>-->
        <!--</div>-->

        <!--<td><input type="submit" name="btnok" id="btnok" value="提交"></td>-->
        <!--</tr>-->
        <!--</thead>-->
        <!--</table>-->
        <!--</form>-->
        <!--</div>-->
        <!--<div class="modal-footer">-->
        <!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>-->
        <!--</div>-->
        <!--</div>&lt;!&ndash; /.modal-content &ndash;&gt;-->
        <!--</div>&lt;!&ndash; /.modal &ndash;&gt;-->
        <!--</div>-->

        <div class="ibox-content balance-content" style="display: none;">
            <form method="post" class="form-horizontal" onsubmit="return false">
                <div class="form-group">
                    <div class="col-sm-12">
                        <textarea id="content" name="content" class="form-control" placeholder="请输入驳回理由" style="height:125px;"></textarea>
                    </div>
                </div>
            </form>
        </div>
        <!-- 全局js -->
        <script src="__PUBLIC__/js/jquery.min.js?v=2.1.4"></script>
        <script src="__PUBLIC__/js/bootstrap.min.js?v=3.3.6"></script>
        <!-- 自定义js -->
        <script src="__PUBLIC__/js/content.js?v=1.0.0"></script>
        <script src="__PUBLIC__/js/plugins/layer/layer.min.js"></script>
        <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
        <script>
                var finishsubmit = "<{:U('finishsubmit','','')}>";
                function form_submit() {
                    document.getElementById("form1").submit();
                }
                function reply(id) {
                    $('#hidid').val(id);
                }
                $('#btnok').click(function () {
                    var id = $("#hidid").val();
                    var content = $("#content").val();
                    finish(id, content, '2');
                });
                function finish(id, content, type) {
                    var msg = type == '1' ? '确定已线下打款给用户？' : '确定要驳回该提现吗？';
                    layer.confirm(msg, function (index) {
                        layer.close(index);
                        var loading = layer.load(1, {
                            shade: [0.1, '#fff'] //0.1透明度的白色背景
                        });
                        $.post(finishsubmit, {'id': id, 'content': content, 'type': type},
                                function (data) {
                                    layer.close(loading);
                                    if (data.ret == '1001') {
                                        layer.msg(data.code, {icon: 6, time: 1000});
                                        setTimeout(function () {
                                            window.location.reload();
                                        }, 1000);
                                    } else {
                                        layer.msg(data.code, {icon: 5, time: 1000});
                                    }
                                }, 'json');
                    });
                }
                function balance_edit(id) {
                    var $type = '4';
                    var $content = $('.balance-content');
                    var $txtbalanceremark = $content.find('#content');
                    $txtbalanceremark.val('');
                    //页面层
                    layer.open({
                        title: '驳回理由',
                        type: 1,
                        skin: 'layui-layer-rim', //加上边框
                        btn: ['确定', '取消']
                        , yes: function (index, layero) {
                            var content = $.trim($txtbalanceremark.val());
                            if (content > 0) {
                                $.post(finishsubmit, {'id': id, 'content': content, 'type': $type},
                                        function (data) {
                                            if (data.ret == '1001') {
                                                layer.close(index);
                                                layer.msg(data.code, {icon: 6, time: 1500});
                                                setTimeout(function () {
                                                    window.location.reload();
                                                }, 1500);
                                            } else {
                                                //						layer.close(index);
                                                layer.msg(data.code, {icon: 5, time: 1500});
                                            }
                                        }, 'json');
                            } else {
                                layer.msg("请输入理由");
                            }
                        }, cancel: function () {
                            //右上角关闭回调
                        },
                        area: ['320px', '300px'], //宽高
                        content: $content
                    });
                }
        </script>
    </body>
</html>
